<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Welcome to CodeIgniter</title>

        <style type="text/css">

            body {
                background-color: #fff;
                margin: 40px;
                font: 13px/20px normal Helvetica, Arial, sans-serif;
                color: #4F5155;
            }

            a {
                color: #003399;
                background-color: transparent;
                font-weight: normal;
            }

            h1 {
                color: #444;
                background-color: transparent;
                border-bottom: 1px solid #D0D0D0;
                font-size: 19px;
                font-weight: normal;
                margin: 0 0 14px 0;
                padding: 14px 15px 10px 15px;
            }

            code {
                font-family: Consolas, Monaco, Courier New, Courier, monospace;
                font-size: 12px;
                background-color: #f9f9f9;
                border: 1px solid #D0D0D0;
                color: #002166;
                display: block;
                margin: 14px 0 14px 0;
                padding: 12px 10px 12px 10px;
            }

            #body{
                margin: 0 15px 0 15px;
            }

            p.footer{
                text-align: right;
                font-size: 11px;
                border-top: 1px solid #D0D0D0;
                line-height: 32px;
                padding: 0 10px 0 10px;
                margin: 20px 0 0 0;
            }

            #container{
                margin: 10px;
                border: 1px solid #D0D0D0;
                -webkit-box-shadow: 0 0 8px #D0D0D0;
            }
            hr{
                border:1px solid #dedede;
                border-bottom:none
            }
        </style>
    </head>
    <body>

        <div id="container">
            <h1>Welcome to Excursions Rest Server!</h1>

            <div id="body">

                <p>The page you are looking at is for testing Rest Server.<br />
                    Here is list of server methods to test:</p>

                <hr />

                <!--  Excursions Search     -->
                <h3>Excursions Search</h3>

                <form action="<?= base_url () ?>service/excursions" method="post" id="excusrsionsSearch">

                    <div id="searchContents">
                        <div class="sp_title">
                            <img style="padding-left: 10px;" src="http://localhost/excursionstours-pro/globtour/assets/img/logo.jpg" alt="Globtour Montenegro">
                        </div>
                        <br>
                        <label for="eb_starting">Izaberi dan:</label>
                        <br>
                        <select style="width: 180px; margin-top: 5px;" id="eb_starting" name="eb_starting">

                            <option value="Any" selected="selected">Bilo koji</option>

                            <option value="Monday">Ponedjeljak</option>
                            <option value="Tuesday">Utorak</option>
                            <option value="Wednesday">Srijeda</option>
                            <option value="Thursday">Četvrtak</option>
                            <option value="Friday">Petak </option>
                            <option value="Saturday">Subota</option>
                            <option value="Sunday">Nedjelja</option>


                        </select>   
                        <br class="clearing">

                        <label for="eb_freetext">Pronađi riječ:</label>
                        <br>
                        <input type="text" style="width: 177px; margin-bottom: 6px; border:1px solid #C0C0C0;" name="eb_freetext" id="eb_freetext"> <br class="clearing">

                        <label for="exc_sort">Poređaj po:</label>
                        <br>
                        <select style="width: 180px; margin-top: 5px;" name="exc_sort" id="exc_sort">
                            <option value="none">None</option>
                            <option value="name">Ime</option>
                            <option value="price">Cijena</option>
                        </select>

                        <div class="s_btn" style="margin-top: 23px;">
                            <div class="atlas_btn" style="float: left; margin-right: 5px;">
                                <input type="submit" value="Briši" id="exc_clear">
                            </div>

                            <div class="atlas_btn">
                                <input type="submit" value="Traži">
                            </div>
                        </div>     

                    </div>

                    <input type="hidden" name="lang" value="me">

                </form>

                <hr />

                <!--  Excursions Details     -->
                <h3>Excursions Details</h3>

                <form action="<?= base_url () ?>service/details" method="get" id="excusrsionDetails" style="float: left;">

                    <label for="eb_starting">Izaberi izlet za detalje:</label>
                    <br>
                    <select style="width: 180px; margin-top: 5px;" id="excursion_id" name="excursion_id">
                        <option value="Any" selected="selected">-- Molimo odaberite</option>


                        <?
                            foreach ( $excursions as $excursion ):
                                ?><option value="<?= $excursion['id'] ?>"><?= $excursion['title'] ?></option><?
                            endforeach;
                        ?>
                    </select>

                    <input type="hidden" name="lang" value="me">

                </form>

                <form action="<?= base_url () ?>service/gallery" method="get" id="excusrsionGallery" style="float: left; margin-left: 23px;">

                    <label for="eb_starting">Izaberi izlet za galeriju:</label>
                    <br>
                    <select style="width: 180px; margin-top: 5px;" id="excursion_gallery_id" name="excursion_id">
                        <option value="Any" selected="selected">-- Molimo odaberite</option>


                        <?
                            foreach ( $excursions as $excursion ):
                                ?><option value="<?= $excursion['id'] ?>"><?= $excursion['title'] ?></option><?
                            endforeach;
                        ?>
                    </select>

                    <input type="hidden" name="lang" value="me">

                </form>
                <div style="clear: both;"></div>

                <hr  /> 

                <h3>Check Availiable</h3>

                <p>Array ( [exc_id] => 15 [exc_date] => 27.06.2012 [adults] => 2 [children] => 0 [totalprice] => 30 [adultprice] => 15 [chprice] => 10 )</p>

                <form action="<?= base_url () ?>service/check_capacity" method="post">

                    <input type="hidden" name="excid" value="15">
                    <input type="hidden" name="date" value="<?= time ( '27.06.2012' ) ?>">
                    <input type="hidden" name="noadult" value="2">
                    <input type="hidden" name="noch" value="0">
                    <input type="hidden" name="persons" value="2">
                    <input type="hidden" name="totalprice" value="30">
                    <input type="hidden" name="adultprice" value="15">
                    <input type="hidden" name="chprice" value="10">
                    <input type="hidden" name="lang" value="me">

                    <input type="submit" value="Provjeri dostupnost">

                </form>


                <hr  />

                <h3>Do Booking</h3>

                <p>

                    Array ( [excid] => 6 [noadult] => 2 [noch] => 0 [persons] => 2 [adultprice] => 42.00 [chprice] => 21.00 [totalprice] => 84.00 [date] => 1340351566 [a_title] => Array ( [0] => Mr [1] => Mr ) [a_firstName] => Array ( [0] => a [1] => a ) [a_lastName] => Array ( [0] => a [1] => a ) [email] => a [email1] => a ) 
                    
                </p>

                <form action="<?= base_url () ?>service/do_booking_new" method="post">

                    <input type="hidden" name="address" value="Jovana tomasevica 32">
                    <input type="hidden" name="city" value="Bar">
                    <input type="hidden" name="country" value="Montenegro">
                    <input type="hidden" name="zip_code" value="85000">
                    <input type="hidden" name="pickup_location" value="Ulcinj, Hotel Ada Bojana 06:50">
                    <input type="hidden" name="excid" value="6">
                    <input type="hidden" name="date" value="<?= time ( '27.06.2012' ) ?>">
                    <input type="hidden" name="noadult" value="2">
                    <input type="hidden" name="noch" value="0">
                    <input type="hidden" name="persons" value="2">
                    <input type="hidden" name="totalprice" value="30">
                    <input type="hidden" name="adultprice" value="15">
                    <input type="hidden" name="chprice" value="10">
                    <input type="hidden" name="a_title[]" value="Mr">
                    <input type="hidden" name="a_title[]" value="Mr">
                    <input type="hidden" name="a_firstName[]" value="a">
                    <input type="hidden" name="a_firstName[]" value="a">
                    <input type="hidden" name="a_lastName[]" value="a">
                    <input type="hidden" name="a_lastName[]" value="a">
                    <input type="hidden" name="email" value="a">
                    <input type="hidden" name="email1" value="a">
                    <input type="hidden" name="lang" value="me">
                    <input type="hidden" name="s_b_i" value="Localhost">

                    <input type="submit" value="Book Now">

                </form> 

                <hr  />

                <h3>Booking Information</h3>

                <p>Booking ID: 169</p>

                <form action="<?= base_url () ?>service/total" method="get">

                    <input type="hidden" name="fbid" value="169">

                    <input type="submit" value="Booking Information">

                </form>

                <hr  />

                <h3>Transaction Information</h3>

                <p>Booking ID: 169</p>

                <form action="<?= base_url () ?>service/show_transaction" method="post">

                    <input type="hidden" name="trans_id" value="491OaDrDL1wUfx5j8HzOAV/9cQM=">

                    <input type="submit" value="Show transaction">

                </form>

                <hr  />



            </div>

            <p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds</p>
        </div>

    </body>
</html>
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>

<script type="text/javascript">
    $(document).ready(function() {

        $('#exc_clear').live('click', function() {

            $('#eb_starting').val('Any');
            $('#eb_freetext').val('');
            $('#exc_sort').val('none');
            return false;

        });

        $('#eb_starting').live('change', function() {
            $('#excusrsionsSearch').submit()
        });

        $('#exc_sort').live('change', function() {
            $('#excusrsionsSearch').submit()
        });

        $('#excursion_id').live('change', function() {
            $('#excusrsionDetails').submit()
        });

        $('#excursion_gallery_id').live('change', function() {
            $('#excusrsionGallery').submit()
        });

    });
</script>